package com.xbongbong.pro.statistic.result.pojo;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 单个统计聚合结果
 * @author zcp
 * @version v1.0
 * @date 2019/2/19 16:02
 * @since v1.0
 */
@Getter
@Setter
@ToString
public class ElasticAggsPojo implements Serializable {
    private static final long serialVersionUID = 6469499030499748051L;

    /**
     * 聚合结果，格式为：
     * [{"key":"2019-01-01","value":"0"},{"key":"2019-01-02","value":"0"}]
     */
    private List<AggsBucketsPojo> buckets;
    /**
     * 总数
     */
    private String total;

    public ElasticAggsPojo() {
        buckets = new ArrayList<>();
        total = "";
    }
}
